<?php
include("admin_check.php");
include_once("../function.php");
include_once("../class/bonus_class.php");
session_start();
header("Content-Type: text/html;charset=utf-8");
checkqx(2,18);
if ($_POST['button2']){
    $_bonus_cl=new bonus_class();
    $sql="select * from member where ispay>0 ";
    $query=mysql_query($sql);
    while($rs=mysql_fetch_assoc($query)){
        $_bonus_cl->b1bonus($rs['id']);
        $_bonus_cl->b0bonus();
    }
    echo "<script language=javascript>alert('奖金分红发放完成.');window.location.href='?'</script>";

}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>清空数据库</title>
    <link href="css/table.css" rel="stylesheet" type="text/css">
    <link href="css/style.css" rel="stylesheet" type="text/css">
    <link href="../layui-master/dist/css/layui.css" rel="stylesheet" type="text/css">
    <script src="../layui-master/dist/layui.js"></script>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<table width="100%" cellpadding="3" cellspacing="1" border="0" align="center" class="layui-table" lay-skin="line">
    <tr>
        <td align="center"><strong><font color="#FF0000">注意：结算奖金前请先做好数据备份</font></strong></td>
    </tr>
    <tr >
        <td align="center">
                <input name="button2" type="submit" class="layui-btn layui-btn-warm" id="button2" value="奖金分红发放" onClick="{if(confirm('您确定要结算奖金吗?')){this.document.selform.submit();return true;}return false;}"/>
        </td>
    </tr>
</table>
</form>
</body>
</html>